3.1.33 \(\int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx\) [33]

3.1.33.1 Optimal result
3.1.33.2 Mathematica [A] (verified)
3.1.33.3 Rubi [A] (verified)
3.1.33.4 Maple [A] (verified)
3.1.33.5 Fricas [A] (verification not implemented)
3.1.33.6 Sympy [B] (verification not implemented)
3.1.33.7 Maxima [A] (verification not implemented)
3.1.33.8 Giac [B] (verification not implemented)
3.1.33.9 Mupad [B] (verification not implemented)

3.1.33.1 Optimal result

Integrand size = 16, antiderivative size = 97 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=\frac {b f x}{2 d}+\frac {(e+f x)^2 (a+b \text {arctanh}(c+d x))}{2 f}+\frac {b (d e+f-c f)^2 \log (1-c-d x)}{4 d^2 f}-\frac {b (d e-(1+c) f)^2 \log (1+c+d x)}{4 d^2 f} \]

output
1/2*b*f*x/d+1/2*(f*x+e)^2*(a+b*arctanh(d*x+c))/f+1/4*b*(-c*f+d*e+f)^2*ln(- 
d*x-c+1)/d^2/f-1/4*b*(d*e-(1+c)*f)^2*ln(d*x+c+1)/d^2/f
 
3.1.33.2 Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.42 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=a e x+\frac {b f x}{2 d}+\frac {1}{2} a f x^2+b e x \text {arctanh}(c+d x)+\frac {1}{2} b f x^2 \text {arctanh}(c+d x)+\frac {b \left (1-2 c+c^2\right ) f \log (1-c-d x)}{4 d^2}+\frac {b \left (-1-2 c-c^2\right ) f \log (1+c+d x)}{4 d^2}+\frac {b e (-((-1+c) \log (1-c-d x))+(1+c) \log (1+c+d x))}{2 d} \]

input
Integrate[(e + f*x)*(a + b*ArcTanh[c + d*x]),x]
 
output
a*e*x + (b*f*x)/(2*d) + (a*f*x^2)/2 + b*e*x*ArcTanh[c + d*x] + (b*f*x^2*Ar 
cTanh[c + d*x])/2 + (b*(1 - 2*c + c^2)*f*Log[1 - c - d*x])/(4*d^2) + (b*(- 
1 - 2*c - c^2)*f*Log[1 + c + d*x])/(4*d^2) + (b*e*(-((-1 + c)*Log[1 - c - 
d*x]) + (1 + c)*Log[1 + c + d*x]))/(2*d)
 
3.1.33.3 Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.09, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {6661, 27, 6478, 477, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx\)

\(\Big \downarrow \) 6661

\(\displaystyle \frac {\int \frac {\left (d \left (e-\frac {c f}{d}\right )+f (c+d x)\right ) (a+b \text {arctanh}(c+d x))}{d}d(c+d x)}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int (d e-c f+f (c+d x)) (a+b \text {arctanh}(c+d x))d(c+d x)}{d^2}\)

\(\Big \downarrow \) 6478

\(\displaystyle \frac {\frac {(f (c+d x)-c f+d e)^2 (a+b \text {arctanh}(c+d x))}{2 f}-\frac {b \int \frac {(d e-c f+f (c+d x))^2}{1-(c+d x)^2}d(c+d x)}{2 f}}{d^2}\)

\(\Big \downarrow \) 477

\(\displaystyle \frac {\frac {(f (c+d x)-c f+d e)^2 (a+b \text {arctanh}(c+d x))}{2 f}-\frac {b \int \left (-f^2+\frac {(d e-c f+f)^2}{2 (-c-d x+1)}+\frac {(d e-(c+1) f)^2}{2 (c+d x+1)}\right )d(c+d x)}{2 f}}{d^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {(f (c+d x)-c f+d e)^2 (a+b \text {arctanh}(c+d x))}{2 f}-\frac {b \left (-\frac {1}{2} (-c f+d e+f)^2 \log (-c-d x+1)+\frac {1}{2} (d e-(c+1) f)^2 \log (c+d x+1)-\left (f^2 (c+d x)\right )\right )}{2 f}}{d^2}\)

input
Int[(e + f*x)*(a + b*ArcTanh[c + d*x]),x]
 
output
(((d*e - c*f + f*(c + d*x))^2*(a + b*ArcTanh[c + d*x]))/(2*f) - (b*(-(f^2* 
(c + d*x)) - ((d*e + f - c*f)^2*Log[1 - c - d*x])/2 + ((d*e - (1 + c)*f)^2 
*Log[1 + c + d*x])/2))/(2*f))/d^2
 

3.1.33.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 477
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
a^p   Int[ExpandIntegrand[(c + d*x)^n*(1 - Rt[-b/a, 2]*x)^p*(1 + Rt[-b/a, 2 
]*x)^p, x], x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IntegerQ[n] & 
& NiceSqrtQ[-b/a] &&  !FractionalPowerFactorQ[Rt[-b/a, 2]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 6478
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(d + e*x)^(q + 1)*((a + b*ArcTanh[c*x])/(e*(q + 1))), x] - Simp[b 
*(c/(e*(q + 1)))   Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ[{a, 
 b, c, d, e, q}, x] && NeQ[q, -1]
 

rule 6661
Int[((a_.) + ArcTanh[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^( 
m_.), x_Symbol] :> Simp[1/d   Subst[Int[((d*e - c*f)/d + f*(x/d))^m*(a + b* 
ArcTanh[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IG 
tQ[p, 0]
 
3.1.33.4 Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.26

method result size
parts \(a \left (\frac {1}{2} f \,x^{2}+e x \right )+\frac {b \left (\frac {\operatorname {arctanh}\left (d x +c \right ) \left (d x +c \right )^{2} f}{2 d}-\frac {\operatorname {arctanh}\left (d x +c \right ) c f \left (d x +c \right )}{d}+\operatorname {arctanh}\left (d x +c \right ) e \left (d x +c \right )-\frac {-f \left (d x +c \right )-\frac {\left (-2 c f +2 d e +f \right ) \ln \left (d x +c -1\right )}{2}+\frac {\left (2 c f -2 d e +f \right ) \ln \left (d x +c +1\right )}{2}}{2 d}\right )}{d}\) \(122\)
derivativedivides \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \left (\operatorname {arctanh}\left (d x +c \right ) f c \left (d x +c \right )-\operatorname {arctanh}\left (d x +c \right ) e d \left (d x +c \right )-\frac {\operatorname {arctanh}\left (d x +c \right ) f \left (d x +c \right )^{2}}{2}-\frac {f \left (d x +c \right )}{2}+\frac {\left (2 c f -2 d e -f \right ) \ln \left (d x +c -1\right )}{4}-\frac {\left (-2 c f +2 d e -f \right ) \ln \left (d x +c +1\right )}{4}\right )}{d}}{d}\) \(142\)
default \(\frac {-\frac {a \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b \left (\operatorname {arctanh}\left (d x +c \right ) f c \left (d x +c \right )-\operatorname {arctanh}\left (d x +c \right ) e d \left (d x +c \right )-\frac {\operatorname {arctanh}\left (d x +c \right ) f \left (d x +c \right )^{2}}{2}-\frac {f \left (d x +c \right )}{2}+\frac {\left (2 c f -2 d e -f \right ) \ln \left (d x +c -1\right )}{4}-\frac {\left (-2 c f +2 d e -f \right ) \ln \left (d x +c +1\right )}{4}\right )}{d}}{d}\) \(142\)
parallelrisch \(-\frac {-\operatorname {arctanh}\left (d x +c \right ) b \,d^{2} f \,x^{2}-a \,d^{2} f \,x^{2}-2 x \,\operatorname {arctanh}\left (d x +c \right ) b \,d^{2} e -2 a \,d^{2} e x +\operatorname {arctanh}\left (d x +c \right ) b \,c^{2} f -2 \,\operatorname {arctanh}\left (d x +c \right ) b c d e +2 \ln \left (d x +c -1\right ) b c f -2 \ln \left (d x +c -1\right ) b d e -b d f x +2 \,\operatorname {arctanh}\left (d x +c \right ) b c f -2 \,\operatorname {arctanh}\left (d x +c \right ) b d e +a \,c^{2} f +4 a c d e +\operatorname {arctanh}\left (d x +c \right ) b f +2 b c f -a f}{2 d^{2}}\) \(161\)
risch \(\frac {b x \left (f x +2 e \right ) \ln \left (d x +c +1\right )}{4}-\frac {b f \,x^{2} \ln \left (-d x -c +1\right )}{4}-\frac {b e x \ln \left (-d x -c +1\right )}{2}+\frac {a f \,x^{2}}{2}+\frac {\ln \left (-d x -c +1\right ) b \,c^{2} f}{4 d^{2}}-\frac {\ln \left (-d x -c +1\right ) b c e}{2 d}-\frac {\ln \left (d x +c +1\right ) b \,c^{2} f}{4 d^{2}}+\frac {\ln \left (d x +c +1\right ) b c e}{2 d}+a e x -\frac {\ln \left (-d x -c +1\right ) b c f}{2 d^{2}}+\frac {\ln \left (-d x -c +1\right ) b e}{2 d}-\frac {\ln \left (d x +c +1\right ) b c f}{2 d^{2}}+\frac {\ln \left (d x +c +1\right ) b e}{2 d}+\frac {b f x}{2 d}+\frac {\ln \left (-d x -c +1\right ) b f}{4 d^{2}}-\frac {\ln \left (d x +c +1\right ) b f}{4 d^{2}}\) \(236\)

input
int((f*x+e)*(a+b*arctanh(d*x+c)),x,method=_RETURNVERBOSE)
 
output
a*(1/2*f*x^2+e*x)+b/d*(1/2/d*arctanh(d*x+c)*(d*x+c)^2*f-1/d*arctanh(d*x+c) 
*c*f*(d*x+c)+arctanh(d*x+c)*e*(d*x+c)-1/2/d*(-f*(d*x+c)-1/2*(-2*c*f+2*d*e+ 
f)*ln(d*x+c-1)+1/2*(2*c*f-2*d*e+f)*ln(d*x+c+1)))
 
3.1.33.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.38 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=\frac {2 \, a d^{2} f x^{2} + 2 \, {\left (2 \, a d^{2} e + b d f\right )} x + {\left (2 \, {\left (b c + b\right )} d e - {\left (b c^{2} + 2 \, b c + b\right )} f\right )} \log \left (d x + c + 1\right ) - {\left (2 \, {\left (b c - b\right )} d e - {\left (b c^{2} - 2 \, b c + b\right )} f\right )} \log \left (d x + c - 1\right ) + {\left (b d^{2} f x^{2} + 2 \, b d^{2} e x\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{4 \, d^{2}} \]

input
integrate((f*x+e)*(a+b*arctanh(d*x+c)),x, algorithm="fricas")
 
output
1/4*(2*a*d^2*f*x^2 + 2*(2*a*d^2*e + b*d*f)*x + (2*(b*c + b)*d*e - (b*c^2 + 
 2*b*c + b)*f)*log(d*x + c + 1) - (2*(b*c - b)*d*e - (b*c^2 - 2*b*c + b)*f 
)*log(d*x + c - 1) + (b*d^2*f*x^2 + 2*b*d^2*e*x)*log(-(d*x + c + 1)/(d*x + 
 c - 1)))/d^2
 
3.1.33.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (82) = 164\).

Time = 0.43 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.78 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=\begin {cases} a e x + \frac {a f x^{2}}{2} - \frac {b c^{2} f \operatorname {atanh}{\left (c + d x \right )}}{2 d^{2}} + \frac {b c e \operatorname {atanh}{\left (c + d x \right )}}{d} - \frac {b c f \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d^{2}} + \frac {b c f \operatorname {atanh}{\left (c + d x \right )}}{d^{2}} + b e x \operatorname {atanh}{\left (c + d x \right )} + \frac {b f x^{2} \operatorname {atanh}{\left (c + d x \right )}}{2} + \frac {b e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b f x}{2 d} - \frac {b f \operatorname {atanh}{\left (c + d x \right )}}{2 d^{2}} & \text {for}\: d \neq 0 \\\left (a + b \operatorname {atanh}{\left (c \right )}\right ) \left (e x + \frac {f x^{2}}{2}\right ) & \text {otherwise} \end {cases} \]

input
integrate((f*x+e)*(a+b*atanh(d*x+c)),x)
 
output
Piecewise((a*e*x + a*f*x**2/2 - b*c**2*f*atanh(c + d*x)/(2*d**2) + b*c*e*a 
tanh(c + d*x)/d - b*c*f*log(c/d + x + 1/d)/d**2 + b*c*f*atanh(c + d*x)/d** 
2 + b*e*x*atanh(c + d*x) + b*f*x**2*atanh(c + d*x)/2 + b*e*log(c/d + x + 1 
/d)/d - b*e*atanh(c + d*x)/d + b*f*x/(2*d) - b*f*atanh(c + d*x)/(2*d**2), 
Ne(d, 0)), ((a + b*atanh(c))*(e*x + f*x**2/2), True))
 
3.1.33.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.12 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=\frac {1}{2} \, a f x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} b f + a e x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} b e}{2 \, d} \]

input
integrate((f*x+e)*(a+b*arctanh(d*x+c)),x, algorithm="maxima")
 
output
1/2*a*f*x^2 + 1/4*(2*x^2*arctanh(d*x + c) + d*(2*x/d^2 - (c^2 + 2*c + 1)*l 
og(d*x + c + 1)/d^3 + (c^2 - 2*c + 1)*log(d*x + c - 1)/d^3))*b*f + a*e*x + 
 1/2*(2*(d*x + c)*arctanh(d*x + c) + log(-(d*x + c)^2 + 1))*b*e/d
 
3.1.33.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 341 vs. \(2 (89) = 178\).

Time = 0.29 (sec) , antiderivative size = 341, normalized size of antiderivative = 3.52 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=\frac {1}{2} \, {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )} {\left (\frac {{\left (\frac {{\left (d x + c + 1\right )} b d e}{d x + c - 1} - b d e - \frac {{\left (d x + c + 1\right )} b c f}{d x + c - 1} + b c f + \frac {{\left (d x + c + 1\right )} b f}{d x + c - 1}\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{\frac {{\left (d x + c + 1\right )}^{2} d^{3}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{3}}{d x + c - 1} + d^{3}} + \frac {\frac {2 \, {\left (d x + c + 1\right )} a d e}{d x + c - 1} - 2 \, a d e - \frac {2 \, {\left (d x + c + 1\right )} a c f}{d x + c - 1} + 2 \, a c f + \frac {2 \, {\left (d x + c + 1\right )} a f}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} b f}{d x + c - 1} - b f}{\frac {{\left (d x + c + 1\right )}^{2} d^{3}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{3}}{d x + c - 1} + d^{3}} - \frac {{\left (b d e - b c f\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d^{3}} + \frac {{\left (b d e - b c f\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d^{3}}\right )} \]

input
integrate((f*x+e)*(a+b*arctanh(d*x+c)),x, algorithm="giac")
 
output
1/2*((c + 1)*d - (c - 1)*d)*(((d*x + c + 1)*b*d*e/(d*x + c - 1) - b*d*e - 
(d*x + c + 1)*b*c*f/(d*x + c - 1) + b*c*f + (d*x + c + 1)*b*f/(d*x + c - 1 
))*log(-(d*x + c + 1)/(d*x + c - 1))/((d*x + c + 1)^2*d^3/(d*x + c - 1)^2 
- 2*(d*x + c + 1)*d^3/(d*x + c - 1) + d^3) + (2*(d*x + c + 1)*a*d*e/(d*x + 
 c - 1) - 2*a*d*e - 2*(d*x + c + 1)*a*c*f/(d*x + c - 1) + 2*a*c*f + 2*(d*x 
 + c + 1)*a*f/(d*x + c - 1) + (d*x + c + 1)*b*f/(d*x + c - 1) - b*f)/((d*x 
 + c + 1)^2*d^3/(d*x + c - 1)^2 - 2*(d*x + c + 1)*d^3/(d*x + c - 1) + d^3) 
 - (b*d*e - b*c*f)*log(-(d*x + c + 1)/(d*x + c - 1) + 1)/d^3 + (b*d*e - b* 
c*f)*log(-(d*x + c + 1)/(d*x + c - 1))/d^3)
 
3.1.33.9 Mupad [B] (verification not implemented)

Time = 1.50 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.40 \[ \int (e+f x) (a+b \text {arctanh}(c+d x)) \, dx=a\,e\,x+\frac {a\,f\,x^2}{2}+\frac {b\,e\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2-1\right )}{2\,d}-\frac {b\,f\,\mathrm {atanh}\left (c+d\,x\right )}{2\,d^2}+\frac {b\,f\,x^2\,\mathrm {atanh}\left (c+d\,x\right )}{2}+\frac {b\,f\,x}{2\,d}+b\,e\,x\,\mathrm {atanh}\left (c+d\,x\right )-\frac {b\,c^2\,f\,\mathrm {atanh}\left (c+d\,x\right )}{2\,d^2}-\frac {b\,c\,f\,\ln \left (c^2+2\,c\,d\,x+d^2\,x^2-1\right )}{2\,d^2}+\frac {b\,c\,e\,\mathrm {atanh}\left (c+d\,x\right )}{d} \]

input
int((e + f*x)*(a + b*atanh(c + d*x)),x)
 
output
a*e*x + (a*f*x^2)/2 + (b*e*log(c^2 + d^2*x^2 + 2*c*d*x - 1))/(2*d) - (b*f* 
atanh(c + d*x))/(2*d^2) + (b*f*x^2*atanh(c + d*x))/2 + (b*f*x)/(2*d) + b*e 
*x*atanh(c + d*x) - (b*c^2*f*atanh(c + d*x))/(2*d^2) - (b*c*f*log(c^2 + d^ 
2*x^2 + 2*c*d*x - 1))/(2*d^2) + (b*c*e*atanh(c + d*x))/d